package net.qhzw.vip.qiyu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 退车申请表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dts_car_retreat")
public class DtsCarRetreat {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    private Long shopId;

    /**
     * 租车申请ID
     */
    @TableField(value = "car_rental_id")
    private Long carRentalId;

    /**
     * 收款码
     */
    @TableField(value = "rcpt_code")
    private String rcptCode;

    /**
     * 退车备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 退车车辆照片
     */
    @TableField(value = "retreat_photo")
    private String retreatPhoto;

    /**
     * 电动车ID
     */
    @TableField(value = "repair_code_id")
    private Long repairCodeId;

    /**
     * 审核人员
     */
    @TableField(value = "admin_id")
    private Long adminId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 修改人
     */
    @TableField(value = "modify_by")
    private Long modifyBy;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 审核通过时间
     */
    @TableField(value = "approval_time")
    private Date approvalTime;

    /**
     * 退车状态
     *  1:新申请
     *  2:待上传退费凭证
     *  3:待上传收账凭证
     *  4:费用已完结
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 审核意见
     */
    @TableField(value = "audit_opinion")
    private String auditOpinion;

    /**
     * 担保公司ID
     */
    @TableField(value = "guarantee_company_id")
    private Long guaranteeCompanyId;

    /**
     * 退车站点ID
     */
    @TableField(value = "community_id")
    private Long communityId;

    /**
     * 付款凭证
     */
    @TableField(value = "payment_code")
    private String paymentCode;

    /**
     * 维修费用
     */
    @TableField(value = "repair_fee")
    private BigDecimal repairFee;

    /**
     * 其他费用
     */
    @TableField(value = "othr_fee")
    private BigDecimal othrFee;


    /**
     * 退车费用
     */
    @TableField(value = "return_fee")
    private BigDecimal returnFee;


    /**
     * 退费凭证
     */
    @TableField(value = "rfnd_certificate")
    private String rfndCertificate;

    /**
     * 用户退车时余额
     */
    @TableField(value = "rental_balance")
    private BigDecimal rentalBalance;


    /**
     * 用户退车结算费用
     */
    @TableField(value = "cost")
    private BigDecimal cost;

    /**
     * 退车支付 0:未支付 1:已支付
     */
    @TableField(value = "is_pay")
    private Byte isPay;

    /**
     * 支付时间
     */
    @TableField(value = "pay_time")
    private Date payTime;

    /**
     * 支付订单号
     */
    @TableField(value = "pay_order")
    private String payOrder;

    /**
     * 支付订单号
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 退车退款 0:未退款 1:已退款
     */
    @TableField(value = "is_refund")
    private Byte isRefund;

    /**
     * 退车退款时间
     */
    @TableField(value = "refund_time")
    private Date refundTime;

    /**
     * 退车退款订单号
     */
    @TableField(value = "refund_order")
    private String refundOrder;


    @TableField(value = "app_id")
    private String appId;

    /**
     * 0:审核驳回 1:站点管理员提交申请  2 后台审核通过
     */
    @TableField(value = "retreat_status")
    private int retreatStatus;

}